<?php

namespace App\Http\Controllers\Admin\Scene\Repository;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Http\Controllers\Admin\Scene\Repository\SceneBuy
 *
 * @property int $id
 * @property int|null $scenic 景点id、当查询用户是否拥有该景点讲解试听权也可以通过此表
 * @property int|null $member_id
 * @property int $spot 价格默认为1，为了防止有免费赠送类型的
 * @property string|null $desc 描述说明：如xx景点讲解消费||新用户注册景点赠送
 * @property \Carbon\Carbon|null $created_at
 * @property \Carbon\Carbon|null $updated_at
 * @property-read \App\Http\Controllers\Admin\Member\Repository\Member|null $member
 * @property-read \App\Http\Controllers\Admin\Scene\Repository\Spot|null $scene
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Scene\Repository\SceneBuy whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Scene\Repository\SceneBuy whereDesc($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Scene\Repository\SceneBuy whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Scene\Repository\SceneBuy whereMemberId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Scene\Repository\SceneBuy whereScenic($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Scene\Repository\SceneBuy whereSpot($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Scene\Repository\SceneBuy whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class SceneBuy extends Model
{
    //
    protected $table = 'scenic_buy';
    public function member(){
        return $this->belongsTo('App\Http\Controllers\Admin\Member\Repository\Member','member_id');
    }
    public function scene(){
        return $this->belongsTo('App\Http\Controllers\Admin\Scene\Repository\Spot','scenic');
    }
}
